﻿@{
    
    var itens = new Dictionary<string,string>();
    itens.Add("Quadros", Url.Content("~/Home/Index"));
    
    if(User.IsInRole("Admin") || User.IsInRole("Master")){
        itens.Add("Equipes", Url.Content("~/Home/Equipes"));
    }

    itens.Add("Minhas tarefas", Url.Content("~/Home/MinhasTarefas"));
                    
}

    
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container-fluid">            

                @if (ViewBag.QuadroNome != null || (ViewBag.Quadro != null))
                {
                    <a class="brand" style="color:#fff" href="@Url.Content("~/Home")">Kanban: @(ViewBag.QuadroNome ?? ViewBag.Quadro.Nome)</a>
                }else{
                    <a class="brand" href="@Url.Content("~/Home")">Kanban</a>
                }
            
            <div class="nav-collapse collapse">
                <ul class="nav">            
                    @foreach (KeyValuePair<string, string> item in itens)
                    {                      
                        if(item.Value.EndsWith(ViewContext.RouteData.Values["action"].ToString())){
                            <li class="active"><a href="@Url.Content(item.Value)">@item.Key</a></li>
                        }else{
                            <li><a href="@Url.Content(item.Value)">@item.Key</a></li>
                        }
                    }
                </ul>

                <ul class="nav pull-right">                    
                    <li>
                       <img src="@Url.Content("~/Images/ajax-loader.gif")" style="margin-top:2px; display:none" id="loading" /> 
                    </li>                    
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">@User.Identity.Name <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="@Url.Content("~/Home/Sair")"><i class="icon-off"></i> Sair</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <!--/.nav-collapse -->
        </div>
    </div>
</div>
